import sqlite3
con = sqlite3.connect("tutorial.db")
cur = con.cursor()
cur.execute("DROP TABLE IF EXISTS leaderboard;")
cur.execute("DROP TABLE IF EXISTS feedback;")
cur.execute("""CREATE TABLE leaderboard (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  username TEXT NOT NULL,
  score INTEGER NOT NULL,
  achievements INTEGER NOT NULL,
  submit_date TEXT NOT NULL, 
  created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);""")
cur.execute("""CREATE TABLE feedback (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  contents TEXT NOT NULL,
  created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);""")
con.close()